﻿/*
 * JF
 * 2011-09-20
 */
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using EShop.Model;

namespace EShop.BLL
{
    public class MerchandiseClassBLL
    {
        EShop.DAL.MerchandiseClassDAL oMerchandiseClassDAL = new EShop.DAL.MerchandiseClassDAL();


        /// <summary>
        /// 取所有商品分类数据
        /// </summary>
        /// <returns></returns>
        public List<MerchandiseClass> GetAllMerchandiseClassList()
        {
            return oMerchandiseClassDAL.GetAllMerchandiseClassList();
        }

        /// <summary>
        /// 添加商品类型。
        /// </summary>
        /// <param name="oMerchandiseClass"></param>
        /// <returns></returns>
        public bool AppendMerchandiseClass(EShop.Model.MerchandiseClass oMerchandiseClass)
        {
            if (oMerchandiseClassDAL.AppendMerchandiseClass(oMerchandiseClass) == null)
                return false;
            else return true;
        }

        /// <summary>
        /// 查询商品类型
        /// </summary>
        /// <param name="strMerchandiseClassID"></param>
        /// <returns></returns>
        public DataTable QueryMerchandiseClass(string strMerchandiseClassID)
        {
            return oMerchandiseClassDAL.QueryMerchandiseClass(strMerchandiseClassID);
        }

        /// <summary>
        /// 修改商品类型
        /// </summary>
        /// <param name="oMerchandiseClass"></param>
        /// <returns></returns>
        public bool UpdateMerchandiseClass(EShop.Model.MerchandiseClass oMerchandiseClass)
        {
            return oMerchandiseClassDAL.UpdateMerchandiseClass(oMerchandiseClass);
        }
    }
}
